package cn.edu.ujn.finallab.dao;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.edu.ujn.finallab.dao.Orders;

public interface OrdersMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(Orders record);

	int insertSelective(Orders record);

	Orders selectByPrimaryKey(Integer id);

	List<Orders> selectByRoomNuber(String number);

	List<Orders> selectByCustomerName(String name);

	List<Orders> selectByInTime(String intime);

	List<Orders> selectByOutTime(String outtime);
	
	List<Orders> selectByMany(@Param("number")String number,@Param("name")String name,@Param("intime")String intime,@Param("outtime")String outtime);

	List<Orders> selectAllOrder();

	int updateByPrimaryKeySelective(Orders record);

	int updateByPrimaryKey(Orders record);
	
	//查询订单总数
    int selectOrderCount();
    
    //通过起始记录，和记录size放到一个hashMap再封装到List里，
    List<Orders> selectByPageLimit(HashMap<String,Object> map);
    
    //通过身份证号查询未入住订单
    List<Orders> selectUnfinishedOrderByIdcard(String customer_idcard);
    
    Orders selectByOrderNumber(String ordernumber);
    
    Orders selectByRoomNumberAndState(@Param("roomnumber")String roomnumber,@Param("state")String state);
    
  //查询有条件的订单总数
    int selectOrderCountOfMany(@Param("number")String number,@Param("name")String name,@Param("intime")String intime,@Param("outtime")String outtime);
    
    //通过起始记录，和记录size放到一个hashMap再封装到List里，
    List<Orders> selectByPageLimitOfMany(HashMap<String,Object> map);
}